#include "BinarySearchTree.h"
#include <chrono>

int main(int argc, char* argv[])
{
  //测试基于BST的排序函数;
  typedef std::chrono::high_resolution_clock myclock;
    int n = 0;
    std::cin >> n;
    int* head = new int[n];
    for(int i = 0;i < n;i++)
      {
	std::cin >> *(head + i);
	std::cout << *(head + i) << "\t";
      }
    std::cout << "\b" << std::endl;
    myclock::time_point beginning = myclock::now();
    BST_sort(head, n);
    myclock::duration d = myclock::now() - beginning;
    std::cout << "time: " << d.count() << std::endl;
    return 0;
};
